package me.boot.db.mybatis.propertites;

import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import me.base.commom.model.dto.BaseDTO;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 数据源简易属性
 * {@link DataSourceProperty}
 */
@Getter
@Setter
@ConfigurationProperties(prefix = BasicDataSourceProperties.PREFIX)
public class BasicDataSourceProperties extends BaseDTO {
    public static final String PREFIX = "spring.datasource";

    /**
     * 数据源驱动
     */
    @ApiModelProperty(value = "数据源驱动", example = "com.mysql.cj.jdbc.Driver")
    private String driverClassName = "com.mysql.cj.jdbc.Driver";

    /**
     * 数据源地址
     */
    @ApiModelProperty(value = "数据源地址", example = "jdbc:mysql://localhost:3306/master")
    private String url = "jdbc:mysql://localhost:3306/master";

    /**
     * 数据源用户名
     */
    @ApiModelProperty(value = "数据源用户名", example = "root")
    private String username = "root";

    /**
     * 数据源密码
     */
    @ApiModelProperty(value = "数据源密码", notes = "可以加密", example = "123456")
    private String password = "123456";
}
